import BasicLayout from "@/layouts/basic-layout";

let meta = {
  auth: true,
};

let routes = [
    {
      path: "/",
      name: "home",
      redirect: {
        name: `homepage`,
      },
      meta,
      component: BasicLayout,
      children: [
        {
          path: "/home",
          name: `homepage`,
          meta: {
            ...meta,
            title: "首页",
            closable: false,
          },
          component: () => import("@/pages/home"),
        },
      ],
    },
    {
      path: "/",
      name: "enterpriseInforManage",
      redirect: {
        name: `enterpriseInforInquiry`,
      },
      meta,
      component: BasicLayout,
      children: [
        {
          path: "/enterpriseInforInquiry",
          name: `enterpriseInforInquiry`,
          meta: {
            ...meta,
            title: "企业信息查询",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/enterpriseInforManage/enterpriseInforInquiry"
            ),
        },
        {
          path: "/enterpriseInforExamine",
          name: `enterpriseInforExamine`,
          meta: {
            ...meta,
            title: "企业信息审核",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/enterpriseInforManage/enterpriseInforExamine"
            ),
        },
        {
          path: "/recordInforInquiry",
          name: `recordInforInquiry`,
          meta: {
            ...meta,
            title: "备案项目查询",
            closable: true,
          },
          component: () =>
            import("@/pages/enterpriseInforManage/recordInforInquiry"),
        },
        {
          path: "/sharingRuleAudit",
          name: `sharingRuleAudit`,
          meta: {
            ...meta,
            title: "企业收益规则审核",
            closable: true,
          },
          component: () =>
            import("@/pages/enterpriseInforManage/sharingRuleAudit"),
        },
      ],
    },
    {
      path: "/",
      name: "enterpriseManage",
      redirect: {
        name: `enterpriseManage`,
      },
      meta,
      component: BasicLayout,
      children: [
        {
          path: "/organizationManage",
          name: `organizationManage`,
          meta: {
            ...meta,
            title: "组织及人员管理",
            closable: true,
          },
          component: () =>
            import("@/pages/enterpriseManage/organizationManage"),
        },
        {
          path: "/myEnterprise",
          name: `myEnterprise`,
          meta: {
            ...meta,
            title: "我的企业",
            closable: true,
          },
          component: () =>
            import("@/pages/enterpriseManage/myEnterprise"),
        },
        {
          path: "/enterpriseHistory",
          name: `enterpriseHistory`,
          meta: {
            ...meta,
            title: "审核历史",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/enterpriseManage/myEnterprise/enterpriseHistory"
            ),
        },
        {
          path: "/projectFiling",
          name: `projectFiling`,
          meta: {
            ...meta,
            title: "线下项目备案",
            closable: true,
          },
          component: () =>
            import("@/pages/enterpriseManage/projectFiling"),
        },
        {
          path: "/projectFilingAdd",
          name: `projectFilingAdd`,
          meta: {
            ...meta,
            title: "新建项目备案",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/enterpriseManage/projectFiling/projectFilingAdd"
            ),
        },
        {
          path: "/projectFilingDetails",
          name: `projectFilingDetails`,
          meta: {
            ...meta,
            title: "项目备案详情",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/enterpriseManage/projectFiling/projectFilingDetails"
            ),
        },
      ],
    },
    {
      path: "/",
      name: "businessInformationManage",
      redirect: {
        name: `businessInformationManage`,
      },
      meta,
      component: BasicLayout,
      children: [
        {
          path: "/publishBusinessInfo",
          name: `publishBusinessInfo`,
          meta: {
            ...meta,
            title: "发布经营信息",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationManage/publishBusinessInfo"
            ),
        },
        {
          path: "/myBusinessInfo",
          name: `myBusinessInfo`,
          meta: {
            ...meta,
            title: "我的经营信息查询",
            closable: true,
          },
          component: () =>
            import("@/pages/businessInformationManage/myBusinessInfo"),
        },
        {
          path: "/companyBusinessInfo",
          name: `companyBusinessInfo`,
          meta: {
            ...meta,
            title: "公司经营信息查询",
            closable: true,
          },
          component: () =>
            import("@/pages/businessInformationManage/companyBusinessInfo"),
        },
        {
          path: "/businessInformationDetails",
          name: `businessInformationDetails`,
          meta: {
            ...meta,
            title: "经营信息详情",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationManage/businessInformationDetails"
            ),
        },
        {
          path: "/businessInfoHistory",
          name: `businessInfoHistory`,
          meta: {
            ...meta,
            title: "变更历史记录",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationManage/businessInfoHistory"
            ),
        },
      ],
    },
    {
      path: "/",
      name: "businessInformationMap",
      redirect: {
        name: `businessInformationMap`,
      },
      meta,
      component: BasicLayout,
      children: [
        {
          path: "/businessInformationMap",
          name: `businessInformationMap`,
          meta: {
            ...meta,
            title: "经营信息一张图",
            closable: true,
            cache: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationTracking/businessInformationMap"
            ),
        },
      ],
    },
    {
      path: "/",
      name: "businessInformationTracking",
      redirect: {
        name: `businessInformationTracking`,
      },
      meta,
      component: BasicLayout,
      children: [
        {
          path: "/businessInformationReceive",
          name: `businessInformationReceive`,
          meta: {
            ...meta,
            title: "经营信息接收",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationTracking/businessInformationReceive"
            ),
        },
        {
          path: "/businessInformationTrack",
          name: `businessInformationTrack`,
          meta: {
            ...meta,
            title: "经营信息跟踪",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationTracking/businessInformationTrack"
            ),
        },
        {
          path: "/businessInformationWarning",
          name: `businessInformationWarning`,
          meta: {
            ...meta,
            title: "经营信息预警查询",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationTracking/businessInformationWarning"
            ),
        },
        {
          path: "/businessInfoReceiveDetails",
          name: `businessInfoReceiveDetails`,
          meta: {
            ...meta,
            title: "经营信息接收详情",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationTracking/businessInformationReceive/businessInfoReceiveDetails"
            ),
        },
        {
          path: "/businessInfoTrackDetails",
          name: `businessInfoTrackDetails`,
          meta: {
            ...meta,
            title: "经营信息反馈",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationTracking/businessInformationTrack/businessInfoTrackDetails"
            ),
        },
        {
          path: "/businessInfoTrackFeedback",
          name: `businessInfoTrackFeedback`,
          meta: {
            ...meta,
            title: "经营信息反馈填写表",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationTracking/businessInformationTrack/businessInfoTrackFeedback"
            ),
        },
        {
          path: "/businessInfoWarningDetails",
          name: `businessInfoWarningDetails`,
          meta: {
            ...meta,
            title: "经营信息预警详情",
            closable: true,
          },
          component: () =>
            import(
              "@/pages/businessInformationTracking/businessInformationWarning/businessInfoWarningDetails"
            ),
        },
      ],
    },
    {
      path: "/",
      name: "systemManage",
      redirect: {
        name: `systemManage`,
      },
      meta,
      component: BasicLayout,
      children: [
        {
          path: "/menuManage",
          name: `menuManage`,
          meta: {
            ...meta,
            title: "菜单管理",
            closable: true,
          },
          component: () => import("@/pages/systemManage/menuManage"),
        },
        {
          path: "/permissionManage",
          name: `permissionManage`,
          meta: {
            ...meta,
            title: "权限管理",
            closable: true,
          },
          component: () =>
            import("@/pages/systemManage/permissionManage"),
        },
        {
          path: "/roleManage",
          name: `roleManage`,
          meta: {
            ...meta,
            title: "组织管理",
            closable: true,
          },
          component: () => import("@/pages/systemManage/roleManage"),
        },
        {
          path: "/dictionaryManage",
          name: `dictionaryManage`,
          meta: {
            ...meta,
            title: "字典管理",
            closable: true,
          },
          component: () =>
            import("@/pages/systemManage/dictionaryManage"),
        },
        {
          path: "/logManage",
          name: `logManage`,
          meta: {
            ...meta,
            title: "日志管理",
            closable: true,
          },
          component: () => import("@/pages/systemManage/logManage"),
        },
        {
          path: "/processManage",
          name: `processManage`,
          meta: {
            ...meta,
            title: "流程管理",
            closable: true,
          },
          component: () => import("@/pages/systemManage/processManage"),
        },
        {
          path: "/warningTimeSet",
          name: `warningTimeSet`,
          meta: {
            ...meta,
            title: "预警时间设置",
            closable: true,
          },
          component: () => import("@/pages/systemManage/warningTimeSet"),
        },
        {
          path: "/SMSTemplate",
          name: `SMSTemplate`,
          meta: {
            ...meta,
            title: "短信模板",
            closable: true,
          },
          component: () => import("@/pages/systemManage/warningTimeSet/SMSTemplate"),
        },
        {
          path: "/pageTest",
          name: `pageTest`,
          meta: {
            ...meta,
            title: "预警时间设置",
            closable: true,
          },
          component: () => import("@/pages/pageTest/index"),
        },
      ],
    },
  ];

  export default routes